/*
 * @Description: 用户实体
 * @Author: Haor
 * @Date: 2022-04-02 14:11:50
 * @LastEditTime: 2022-07-30 21:36:18
 * @LastEditors: Haor
 */
import { Column, Entity } from "typeorm";
import { PublicEntity } from "@entities/public.entity";

@Entity({ name: 'sys_user' }) //数据表的名字
export class User extends PublicEntity {
	@Column({ name: 'dept_id', comment: '部门id' })
	deptId: number

    @Column({ name: 'job_id', comment: '职位id' })
    jobId: number

	@Column({ name: 'user_name', comment: '登录用户名' })
	userName: string

	@Column({ name: 'nick_name', comment: '昵称' })
	nickName: string

	// 性别
	@Column({comment: '性别'})
	gender: number

	// 手机号
	@Column()
	phone: string

	// 邮箱
	@Column()
	email: string

	// 头像
	@Column({ name: 'avatar_name' })
	avatarName: string

	// 头像路径
	@Column({ name: 'avatar_path' })
	avatarPath: string

	// 密码
	@Column({ select: false })
	password: string

	// 禁用状态：1启用、0禁用
	@Column()
	enabled: number
}
